gdk: Subtract base size when checking aspect ratio
authorVlad Zahorodnii <vlad.zahorodnii@kde.org>
Sat, 18 Jan 2020 23:56:35 +0000 (01:56 +0200)
committerVlad Zahorodnii <vladzzag@gmail.com>
Sun, 19 Jan 2020 00:22:44 +0000 (02:22 +0200)
commitb36258f2042d610e59a04dde7eaad0aa37a249bf
treeb80a70543142d5786fc4f497fa149693233bc942
parenta463dccd81a0f542afd120e7feb48457663ae507
gdk: Subtract base size when checking aspect ratio

According to the ICCCM spec [1], one should subtract the base size from
the window size before checking that the aspect ratio falls in range.

This change fixes shrinking Firefox Picture-in-Picture windows when
running KDE Plasma (with KWin as the window manager).

[1] https://tronche.com/gui/x/icccm/sec-4.html#s-4.1.2.3
gdk/gdksurface.c